package common

import (
	"os"
)

const (
	ENV_PG_DSN = "PG_DSN_VITEPRESS"
)

// GetPgDsn PostgreSQL 数据库连接字符串
func GetPgDsn() string {
	var v = os.Getenv(ENV_PG_DSN)
	if v == "" {
		b, _ := os.ReadFile("/usr/env/" + ENV_PG_DSN)
		v = string(b)
	}
	return v
}
